#include <string>
#include <iostream>
using namespace std;


class AbstractMakeDrink{
    public:
    virtual void zhushui()=0;//煮水
    virtual void jiaru()=0;//加入东西
    virtual void daoru()=0;//倒入杯中

    void ok(){
        zhushui();
        jiaru();
        daoru();
    }
};

class Coffee :public AbstractMakeDrink{
    virtual void zhushui(){
        cout <<"煮矿泉水"<<endl;
    }
    virtual void jiaru(){
        cout <<"加入咖啡"<<endl;
    }
    virtual void daoru(){
        cout <<"倒入咖啡杯"<<endl;
    }

};

class Tea :public AbstractMakeDrink{
    virtual void zhushui(){
        cout <<"煮纯净水"<<endl;
    }
    virtual void jiaru(){
        cout <<"加入茶叶"<<endl;
    }
    virtual void daoru(){
        cout <<"倒入茶杯"<<endl;
    }

};

void doWork(AbstractMakeDrink *abs){
    abs->ok();
};
void test(){
    //制作咖啡
    doWork(new Coffee);
    //制作茶水
    doWork(new Tea);
};

int main(){
    test();

    return 0;
};